diff --git a/src/Plugin/Block/TYPProfileFacebook.php b/src/Plugin/Block/TYPProfileFacebook.php --- a/src/Plugin/Block/TYPProfileFacebook.php +++ b/src/Plugin/Block/TYPProfileFacebook.php @@ -1,57 +1,57 @@ getRequestUri(); $s = explode("/",$url); $bid = end($s); $this->data = \Drupal::service("typ.search")->getProfile($bid ,AUTO); $this->result = \Drupal::service('typ.unvservice')->loadListing($this->data['customerid'],NULL); $facebook = ''; - if($this->data['customertype'] == 'FL' || $this->data['customertype'] == '' || $this->result['accounting_status'] == '1'){ + if($this->data['customertype'] == 'FL' || $this->data['customertype'] == '' || $this->result['accounting_status'] == '1' || $this->data['hide'] == '1' || $this->data['accounting_status'] == '1'){ $facebook = format_string('
'); } $build = array(); $build[] = array( '#markup' => $facebook, ); return $build; } } \ No newline at end of file diff --git a/templates/typ-profile.html.twig b/templates/typ-profile.html.twig --- a/templates/typ-profile.html.twig +++ b/templates/typ-profile.html.twig @@ -1,481 +1,481 @@ {% set base_images = 'http://media.yellowpages.co.th/yellowpages' %} {% set base_promotion = 'http://promotion.yellowpages.co.th/media/promotion/' %}| {% trans %} Address {% endtrans %}: | {{ [profile.addr,profile.soi,profile.road,profile.subdistrictname,profile.districtname,profile.cityname,profile.postcode]|join(' ') }} | 
| {% trans %} Tel {% endtrans %}: | 
                                         {% if not profile.telno %}
                                         {% else %}
                                             {% if type == 'FL' %}
                                                 {{ profile._format.telno.0 }} {% else %} {% for key, tel in profile._format.telno %} {% if loop.last != key+1 %}{{ tel }}{{ "," }} {% else %}{{ tel }}{% endif %} {% endfor %} {% endif %} {% endif %}  | 
                                 
| {% trans %} Fax {% endtrans %}: | 
                                         {% if not profile.fax %}
                                         {% else %}
                                             {% if type == 'FL' %}
                                                 {{ profile._format.fax.0 }} {% else %} {% for key, fax in profile._format.fax %} {% if loop.last != key+1 %}{{ fax }}{{ "," }} {% else %}{{ fax }}{% endif %} {% endfor %} {% endif %} {% endif %}  | 
                                 
| {% trans %} Email {% endtrans %}: | 
                                         {% if not profile.email %}
                                         {% else %}
                                             {% if type == 'FL' %}
                                                 {% set email =  profile.email|split(',') %}
                                                 {{ email.0 }}
                                                 {#{% for key , mail in email %}#}
                                                     {#{% if loop.last != key+1 %}{{ mail }}, #} {#{% else %}{{ mail }} {% endif %}#} {#{% endfor %}#} {% else %} {% set email = profile.email|split(',') %} {% for key , mail in email %} {% if loop.last != key+1 %}{{ mail }}, {% else %}{{ mail }} {% endif %} {% endfor %} {% endif %} {% endif %}  | 
                                 
| {% trans %} Website {% endtrans %}: | 
                                         {% if not profile.website %}
                                         {% else %}
                                             {% set website_show =  profile.website_show|split(',') %}
                                                 {% if type == 'FL' %}
                                                     {{  website_show.0 }}
                                                     {% else %}
                                                     {% for key , web in website_show %}
                                                         {% if loop.last != key+1 %}{{ web }}, {% else %}{{ web }} {% endif %} {% endfor %} {% endif %} {% endif %}  | 
                                 
| {% trans %} Work-Time {% endtrans %}: | 
                                         {% if not profile.workinghours %}
                                         {% else %}
                                             {{ profile._format.workinghours }} {% endif %}  | 
                                 
":" ","
":" "}) }} + {% else %}{% trans %} Banner {% endtrans %}":" ","
":" "}) }} {% endif %} {% else %} {% if not prodescription or prodescription is empty %} {% else %}